import request from '@/utils/request'

// 查询健康记录列表
export function listHealthlog(query) {
  return request({
    url: '/healthlog/healthlog/list',
    method: 'get',
    params: query
  })
}
// 查询健康记类型
export function getlogtype(query) {
  return request({
    url: '/healthlog/healthlog/getlogtype',
    method: 'get',
    params: {pageNum: 1,
      pageSize: 7,userid:query.userid,typeid:query.typeid}
  })
}

// 查询健康记录详细
export function getHealthlog(id) {
  return request({
    url: '/healthlog/healthlog/' + id,
    method: 'get'
  })
}

// 新增健康记录
export function addHealthlog(data) {
  return request({
    url: '/healthlog/healthlog',
    method: 'post',
    data: data
  })
}

// 修改健康记录
export function updateHealthlog(data) {
  return request({
    url: '/healthlog/healthlog',
    method: 'put',
    data: data
  })
}

// 删除健康记录
export function delHealthlog(id) {
  return request({
    url: '/healthlog/healthlog/' + id,
    method: 'delete'
  })
}
